package com.bng8.superstar_cms.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.bng8.superstar_cms.domain.common.GenderType;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 挑战者表
 *
 * @TableName sup_challenger
 */
@TableName(value = "sup_challenger")
@Data
public class SupChallengerDO implements Serializable {
    /**
     * serialVersionUID
     */
    @TableField(exist = false)
    private static final long serialVersionUID = -2389247980617094556L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 用户名
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 挑战者
     */
    @TableField(value = "challenger")
    private String challenger;

    /**
     * 性别：0：保密, 1：男, 2：女
     */
    @TableField(value = "gender")
    private GenderType gender;

    /**
     * 年龄
     */
    @TableField(value = "age")
    private Integer age;

    /**
     * 任务名称
     */
    @TableField(value = "mission")
    private String mission;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create", fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_update", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime gmtUpdate;

    /**
     * 创建者
     */
    @TableField(value = "creator", fill = FieldFill.INSERT)
    private String creator;

    /**
     * 修改者
     */
    @TableField(value = "operator", fill = FieldFill.INSERT_UPDATE)
    private String operator;

    /**
     * 1：有效 — 1：无效（删除时置为-1）
     */
    @TableField(value = "deleted", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;

    /**
     * 乐观锁
     */
    @TableField(value = "version", fill = FieldFill.INSERT)
    @Version
    private Long version;
}